#include <ucontext.h>
#include <stdio.h>

int done = 0;
ucontext_t c;

void func()
{
    if(done == 0)
    {
        done = 1;
        setcontext(&c);
    }

}

int main()
{

    getcontext(&c);
    if(done)
    {
        printf("done\n");
    }
    else
    {
        printf("not do\n");
    }

    func();
    return 0;
}